// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_APP_ITEM
// * CreateDate    : 2014-02-18 18:04:09
// * Creater       : CodeSmith
// * LastChangeDate: 2014-02-18 18:04:09
// * LastChanger   : 2014-02-18 18:04:09
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Pur
{
/// <summary>
    /// PurAppItem
    /// </summary>
    public partial class PurAppItemBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objPurAppItemEntity">Entity</param>
        /// <returns>Entity</returns>
        public static PurAppItemEntity GetPurAppItem(PurAppItemEntity objPurAppItemEntity)
        {
            return DataAccess.SelectSingle<PurAppItemEntity>(objPurAppItemEntity);
        }
              
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objPurAppItemEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertPurAppItem(PurAppItemEntity objPurAppItemEntity)
        {
            return DataAccess.Insert(objPurAppItemEntity);
        }

        public static bool InsertPurAppItem(List<PurAppItemEntity> objPurAppItemEntityList)
        {
            return DataAccess.Insert(objPurAppItemEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objPurAppItemEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdatePurAppItem(PurAppItemEntity objPurAppItemEntity)
        {
            return DataAccess.Update(objPurAppItemEntity);
        }

        public static bool UpdatePurAppItem(List<PurAppItemEntity> objPurAppItemEntityList)
        {
            return DataAccess.Update<PurAppItemEntity>(objPurAppItemEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objPurAppItemEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeletePurAppItem(PurAppItemEntity objPurAppItemEntity)
        {
            return DataAccess.Delete(objPurAppItemEntity);
        }

        public static bool DeletePurAppItem(List<PurAppItemEntity> objPurAppItemEntityList)
        {
            return DataAccess.Delete<PurAppItemEntity>(objPurAppItemEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetPurAppItemAll()
        {
            return DataAccess.SelectAllDataSet<PurAppItemEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<PurAppItemEntity> GetPurAppItemAllList()
        {
            return DataAccess.SelectAll<PurAppItemEntity>();
        }
        #endregion

        public static List<PurAppItemEntity> GetPurAppItemAllListByAppId(string appId)
        {
            return DataAccess.Select<PurAppItemEntity>(new PurAppItemEntity { PurAppId = appId });
        }
	}
	
	
}	

